<h2>人员登记系统</h2>

<div class="people_list">
    <ul>
        <li>姓 名：<input type="text" id="username" [(ngModel)]="userInfo.username" value="form_input"></li>
        <li>性 别：
            <input type="radio" value="1" id="sex1" name="sex" [(ngModel)]="userInfo.sex"><label for="sex1">男</label>
            <input type="radio" value="2" id="sex2" name="sex" [(ngModel)]="userInfo.sex"><label for="sex2">女</label>
        </li>
        <li>城 市：
            <select name="city" id="city" [(ngModel)]="userInfo.city">
                <option [value]="item" *ngFor="let item of userInfo.citys">{{item}}</option>
            </select>

        </li>
        <li>爱 好：
            <span *ngFor="let item of userInfo.hobby;let key=index">
                <input type="checkbox" [id]="'check'+key" [(ngModel)]="item.checked"><label [for]="'check'+key">{{item.title}}</label>
            </span>
            &nbsp; &nbsp;
        </li>
        <li>备 注：
            <textarea name="mark" id="mark" cols="30" rows="10" [(ngModel)]="userInfo.mark"></textarea>
        </li>
    </ul>

    <button (click)="doSubmit()">获取表单的内容</button>
    <hr/>
</div>

